<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Navo Portable Library: navo/algorithm/hash/signature/crc32.h文件参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- 制作者 Doxygen 1.7.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Navo Portable Library&#160;<span id="projectnumber">Ver 1.0.20120827</span></div>
   <div id="projectbrief">Provides generic platform independent facilities.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="modules.html"><span>模块</span></a></li>
      <li><a href="annotated.html"><span>数据结构</span></a></li>
      <li class="current"><a href="files.html"><span>文件</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>文件列表</span></a></li>
      <li><a href="globals.html"><span>全局定义</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#nested-classes">数据结构</a> &#124;
<a href="#define-members">宏定义</a> &#124;
<a href="#func-members">函数</a>  </div>
  <div class="headertitle">
<h1>navo/algorithm/hash/signature/crc32.h文件参考</h1>  </div>
</div>
<div class="contents">

<p>Definitions and declarations for 32 bit CRC.  
<a href="#_details">更多...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="cdef_8h_source.html">../../../port/cdef.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="integer_8h_source.html">../../../port/integer.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="endian_8h_source.html">../../../port/endian.h</a>&quot;</code><br/>
</div>
<p><a href="crc32_8h_source.html">浏览该文件的源代码。</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
数据结构</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcrc32__ctx.html">crc32_ctx</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">CRC-32上下文  <a href="structcrc32__ctx.html#_details">更多...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="define-members"></a>
宏定义</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a27318dbdc1c4ca48b47421ff26c78532"></a><!-- doxytag: member="crc32.h::__NV_CRC32__" ref="a27318dbdc1c4ca48b47421ff26c78532" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>__NV_CRC32__</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga921ad9756906f79e6e6db5f1c58cd135"></a><!-- doxytag: member="crc32.h::CRC32_SIZE" ref="ga921ad9756906f79e6e6db5f1c58cd135" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CRC-32.html#ga921ad9756906f79e6e6db5f1c58cd135">CRC32_SIZE</a>&#160;&#160;&#160;4</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">32位CRC码表长度 <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga90f9f4792c82826e0ac2bb3b08ecaa4d"></a><!-- doxytag: member="crc32.h::CRC32_POS_IEEE802_3" ref="ga90f9f4792c82826e0ac2bb3b08ecaa4d" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>CRC32_POS_IEEE802_3</b>&#160;&#160;&#160;__cpu_to_le32_c(INT32_C(0x04C11DB7))</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga570ac9f0f836719c8ef643e4b6908cb9"></a><!-- doxytag: member="crc32.h::CRC32_NEG_IEEE802_3" ref="ga570ac9f0f836719c8ef643e4b6908cb9" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>CRC32_NEG_IEEE802_3</b>&#160;&#160;&#160;__cpu_to_le32_c(INT32_C(0xEDB88320))</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga172bd16c7d72bf73491826b4f2e0effa"></a><!-- doxytag: member="crc32.h::CRC32_POS_CASTAGNOLI" ref="ga172bd16c7d72bf73491826b4f2e0effa" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>CRC32_POS_CASTAGNOLI</b>&#160;&#160;&#160;__cpu_to_le32_c(INT32_C(0x1EDC6F41))</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gafa988c3cac4c2a33a03ed8e93ee009a8"></a><!-- doxytag: member="crc32.h::CRC32_NEG_CASTAGNOLI" ref="gafa988c3cac4c2a33a03ed8e93ee009a8" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>CRC32_NEG_CASTAGNOLI</b>&#160;&#160;&#160;__cpu_to_le32_c(INT32_C(0x82F63B78))</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga011785b19519ab77d6f84ea57f148f00"></a><!-- doxytag: member="crc32.h::CRC32_CTX" ref="ga011785b19519ab77d6f84ea57f148f00" args="(name)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CRC-32.html#ga011785b19519ab77d6f84ea57f148f00">CRC32_CTX</a>(name)&#160;&#160;&#160;<a class="el" href="structcrc32__ctx.html">crc32_ctx</a> name = {CRC32_NEG_IEEE802_3, 0}</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">定义名为name的CRC32上下文 <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga0b69f69b02f4dd89b2cec92c1c70947b"></a><!-- doxytag: member="crc32.h::CRC32_TBL_SIZE" ref="ga0b69f69b02f4dd89b2cec92c1c70947b" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>CRC32_TBL_SIZE</b>&#160;&#160;&#160;0x100</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CRC-32.html#ga2725357ae4ce8c49092be9e719b93bb1">crc32_process</a>(ctx, buf, cnt)&#160;&#160;&#160;__crc32_process(ctx, (<a class="el" href="group___xE6_x95_xB4_xE5_x9E_x8B_xE5_xAE_x9A_xE4_xB9_x89.html#gae1affc9ca37cfb624959c866a73f83c2">uint8_t</a>*)(buf), cnt)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">用位移的方式计算CRC  <a href="group__CRC-32.html#ga2725357ae4ce8c49092be9e719b93bb1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CRC-32.html#gac71ef3705e156d498546a177536c9ccc">crc32_update</a>(ctx, tbl, buf, cnt)&#160;&#160;&#160;__crc32_update(ctx, tbl, (<a class="el" href="group___xE6_x95_xB4_xE5_x9E_x8B_xE5_xAE_x9A_xE4_xB9_x89.html#gae1affc9ca37cfb624959c866a73f83c2">uint8_t</a>*)(buf), cnt)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">用查表的方式计算CRC  <a href="group__CRC-32.html#gac71ef3705e156d498546a177536c9ccc"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
函数</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CRC-32.html#ga41894101d8979a8637d826b7a2203546">crc32_build</a> (uint32_t *buf, uint32_t poly)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">建立CRC码表  <a href="group__CRC-32.html#ga41894101d8979a8637d826b7a2203546"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CRC-32.html#gac07c407eb96a4a311b004d3dc16130ec">crc32_init</a> (<a class="el" href="structcrc32__ctx.html">crc32_ctx</a> *ctx, uint32_t poly)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">初始化CRC上下文  <a href="group__CRC-32.html#gac07c407eb96a4a311b004d3dc16130ec"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga877af258448bca9d9f37055f3458bb33"></a><!-- doxytag: member="crc32.h::__crc32_process" ref="ga877af258448bca9d9f37055f3458bb33" args="(crc32_ctx *ctx, uint8_t *buf, size_t cnt)" -->
NV_API void&#160;</td><td class="memItemRight" valign="bottom"><b>__crc32_process</b> (<a class="el" href="structcrc32__ctx.html">crc32_ctx</a> *ctx, <a class="el" href="group___xE6_x95_xB4_xE5_x9E_x8B_xE5_xAE_x9A_xE4_xB9_x89.html#gae1affc9ca37cfb624959c866a73f83c2">uint8_t</a> *buf, size_t cnt)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaf0b95f2affa896957107df24bedb8de7"></a><!-- doxytag: member="crc32.h::__crc32_update" ref="gaf0b95f2affa896957107df24bedb8de7" args="(crc32_ctx *ctx, const uint32_t *tbl, uint8_t *buf, size_t cnt)" -->
NV_API void&#160;</td><td class="memItemRight" valign="bottom"><b>__crc32_update</b> (<a class="el" href="structcrc32__ctx.html">crc32_ctx</a> *ctx, const uint32_t *tbl, <a class="el" href="group___xE6_x95_xB4_xE5_x9E_x8B_xE5_xAE_x9A_xE4_xB9_x89.html#gae1affc9ca37cfb624959c866a73f83c2">uint8_t</a> *buf, size_t cnt)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga54e52a1d2d2285e6aa402bd24b98629c"></a><!-- doxytag: member="crc32.h::__crc32_final" ref="ga54e52a1d2d2285e6aa402bd24b98629c" args="(crc32_ctx *ctx, uint32_t crc)" -->
static uint32_t&#160;</td><td class="memItemRight" valign="bottom"><b>__crc32_final</b> (<a class="el" href="structcrc32__ctx.html">crc32_ctx</a> *ctx, uint32_t crc)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CRC-32.html#ga555d036af7c6276985bbd0396776eb66">crc32_final</a> (<a class="el" href="structcrc32__ctx.html">crc32_ctx</a> *ctx)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">获取CRC校验值  <a href="group__CRC-32.html#ga555d036af7c6276985bbd0396776eb66"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CRC-32.html#ga2a6e216158b7bd62619354679b25255c">crc32_hash_nbstr</a> (const char *str, uint32_t *tbl)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">直接哈希字符串  <a href="group__CRC-32.html#ga2a6e216158b7bd62619354679b25255c"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>详细描述</h2>
<div class="textblock"><p>Definitions and declarations for 32 bit CRC. </p>
<p>Copyright (C) 2012-2022, Henry Kwok 郭弘扬. All rights reserved </p>

<p>在文件<a class="el" href="crc32_8h_source.html">crc32.h</a>中定义。</p>
</div></div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>全部</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>数据结构</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>文件</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>函数</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>变量</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>类型定义</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>宏定义</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address class="footer"><small>Generated at 2015年七月16日 星期四 12:00:38 for Navo Portable Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>
